<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe测试体验页面无刷新</title>
    <script>
        function go() {
            //所有的值，变量，要提前获取
            let url = document.getElementById("url").value;
            document.getElementById("iframeOne").src=url;
        }
    </script>
</head>
<body>

<div>
    <p>请输入地址：</p>
    <p>
        <input type="text" id = "url" value="https://blog.csdn.net/qq_43585922?spm=1000.2115.3001.5343">
        <input type="button" value="提交" onclick="go()">
    </p>
</div>

<div>
    <iframe id="iframeOne" style="width:100%;height: 520px"></iframe>
</div>

</body>
</html>